package com.log4jviewer.filters;

/**
 * Class represents filter constants.
 * 
 * @author <a href="mailto:rd.ryly@gmail.com">Ruslan Diachenko</a>
 */
public final class FilterConstants {

    // Logic used to point relations between rules in filter.
    public static final String AND_LOGIC_OPERAND = "and";
    public static final String OR_LOGIC_OPERAND = "or";
    public static final String[] LOGIC_OPERANDS = { AND_LOGIC_OPERAND, OR_LOGIC_OPERAND };

    // Include/Exclude string in filtration.
    public static final String INCLUDE = "include";
    public static final String EXCLUDE = "exclude";
    public static final String[] MATCH_PATTERN_INCLUDE = { INCLUDE, EXCLUDE };

    // List of levels in Log Level field.
    public static final String DEBUG = "DEBUG";
    public static final String INFO = "INFO";
    public static final String WARN = "WARN";
    public static final String ERROR = "ERROR";
    public static final String FATAL = "FATAL";
    public static final String[] LOG_LEVELS = { DEBUG, INFO, WARN, ERROR, FATAL };

    // Log fields.
    public static final String LEVEL = "level";
    public static final String CATEGORY = "category";
    public static final String MESSAGE = "message";
    public static final String LINE = "line";
    public static final String DATE = "date";
    public static final String NDC = "ndc";
    public static final String THROWABLE = "throwable";
    public static final String[] LOG_FIELDS = {
            LEVEL,
            CATEGORY,
            MESSAGE,
            LINE,
            DATE,
            NDC,
            THROWABLE
    };

    private FilterConstants() {
        // no code
    }
}
